<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.util.*"%>
<%@page import="com.tjsinfo.tjsoa.meetingroom.vo.MeetingRoomEmploy"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.tjsinfo.tjsoa.meetingroom.vo.MeetingIncept"%>
<%@page import="com.tjsinfo.tjsoa.meetingroom.vo.MeetingRoomFileUpload"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	MeetingRoomEmploy infos =(MeetingRoomEmploy)request.getAttribute("roomEmpoly");
	String strName=(String)request.getAttribute("strName");
	String examineUser=(String)request.getAttribute("examineUser");
	String applicationUser=(String)request.getAttribute("applicationUser");
	List<MeetingIncept> inceptList=(List<MeetingIncept>)request.getAttribute("inceptList");
	ArrayList<MeetingRoomFileUpload> fileList=(ArrayList<MeetingRoomFileUpload>)request.getAttribute("fileList");
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
	String type=(String)request.getAttribute("type");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<base href="<%=basePath%>" />
	<title>天津市粮油集团有限公司</title>
	<style type="text/css">

	td {
	font:12px/170% "宋体", "新宋体", "黑体"; color:#000
}
		th {
	font:12px/170% "宋体", "新宋体", "黑体"; color:#000
}
.black_overlays{
			display: none;
			position: absolute;
			top: 0%;
			left: 0%;
			width: 1200px;
			height: 800px;
			background-color: gray;
			z-index:1001;
			-moz-opacity: 0.8;
			opacity:.80;
			filter: alpha(opacity=80);

}

/* 添加任务div样式 */
.ceshi5 {
			    display: none;
				position: absolute;
				top: 25%;
				left: 30%;
				width: 253px;
				height: 235px;
				border: 1px solid #11557B;
				border-bottom: block;
				background-color: #E2F7FF;
				z-index: 1003;
				overflow: auto;
}

.GroupDiv {
	display: none;
	position: absolute;
	border: 1px solid #FFF;
	border-bottom:none;
	z-index:1003;
	overflow: auto;
	background-color:#aacc00;
}

.black_overlays{
	display: block;
	position: absolute;
	top: 0%;
	left: 0%;
	width: 100%;
	height: 100%;
	background-color: #C1EBFC;
	z-index:1002;
	-moz-opacity: 0.8;
	opacity:.80;
	filter: alpha(opacity=30);
}
  </style>
	<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>ajaxFramework/ext-2.1/resources/css/ext-all.css" />
	<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
  	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all.js"></script>
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
	<script type="text/javascript">
	function back()
	{
		history.back(-1);
	}
	window.onload = function(){
		document.getElementById("right").style.height = document.body.clientHeight;
		document.getElementById("tableid").style.height = document.body.clientHeight-40;
		var tb = new Ext.Toolbar(
			{
				height:25
			}
		);
	
	    tb.render('menu');
		tb.add(
		<% 
			if("my".equals(type)){
		%>
			{
		            text:'返回',
		            iconCls: 'daohang',
		        	handler: function(){
	        			location.href="<%=basePath %>tjsinfo/tjsoa/meetingroom/myMeeting.do";
					}
		    }
		<%
			}else{
		%>
		    {
		            text:'返回',
		            iconCls: 'daohang',
		        	handler: function(){
		        		history.go(-1);
					}
		    }
		<%
			}
		%>
	    );
		tb.addFill();
	    tb.addText('<img id="windowResize" src="<%=basePath%>images/m_icon05.gif;"><a style="font-weight:bold; color:black;line-height: 22px;">会议信息</a>&nbsp;&nbsp;&nbsp;');
	}
	
	function showIncept(){
		document.getElementById("inceptDiv").style.top = document.body.clientHeight/4;
		document.getElementById("inceptDiv").style.left = document.body.clientWidth/8;
		document.getElementById("inceptDiv").style.display = "block";
	}
	
	function closeIncept(){
		document.getElementById("inceptDiv").style.display = "none";
	}
	</script>
	</head>
	<body>
		<div id="right" style="overflow-y:scroll;">
		<div id="menu" style="padding-top:4px;"></div>
		<form action="<%=basePath%>tjsinfo/tjsoa/meetingroom/againUpdateArrangements.do" method="post" name="form1">
     	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="tableid">
          <tr>
            <td valign="top" height="100%">
               <div class="contabwd">
               		<table width="100%" height="400"border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="80%">
                            	<table border="0" cellspacing="0" cellpadding="0" align="left" style="margin-top:10px; margin-left:120px">
                                  <tr>
                                    <td>
                                       <table border="0" align="left" cellpadding="0" cellspacing="0" class="ttaabb">
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;会议名称:</td>
                                           <td width="65%"><input readonly="readonly" name="meetingName" value="<%=infos.getMeetingName() %>" type="text" size="70" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;会议室名称:</td>
                                           <td width="65%"><input readonly="readonly" name="meetingName" value="<%=infos.getMeetingRoomMain().getMeetingroomName() %>" type="text" size="70" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;所在地点:</td>
                                           <td width="65%"><input readonly="readonly" name="meetingName" value="<%=infos.getMeetingRoomMain().getPlace() %>" type="text" size="70" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;会议申请:</td>
                                           <td width="65%"><%if("2".equals(infos.getMeetingId())){ out.print(infos.getExamineUserName());%>直接安排<%}else{ %><%=applicationUser %>(<%=infos.getBumen() %>)<%} %></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                       	<%//申请的
										if("1".equals(infos.getMeetingId())){
											if(!"my".equals(type)){%>
                                         <tr>
                                           <td width="25%" align="right"><img src="images/dfdf_03.gif" />&nbsp;会议审批:</td>
                                           <td width="65%"><%=examineUser %></td>
                                           <td width="10%">&nbsp;</td>
                                         </tr>
                                         <%
                                         	}
                                         }
                                         %>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;开始时间:</td>
                                           <td><input readonly="readonly" name="startDay" type="text" value="<%=sdf.format(infos.getStartTime()) %>" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/>
                                           </td>
                                           <td>&nbsp;</td>
                                         </tr>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;会议持续:</td>
                                           <td><input readonly="readonly" name="endDay" type="text" value="<%=infos.getEndTime() %>小时" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/></td>
                                           <td>&nbsp;</td>
                                         </tr>
                                         <%if(!"my".equals(type)){%>
										<tr>
											<td align="right">
												<img src="images/dfdf_03.gif" />
												&nbsp;会议时间段:
											</td>
											<td>
												<%=infos.getRemarks() %>
											</td>
											<td>
												&nbsp;
											</td>
										</tr>
										<%} %>
										<%//申请的
										if("1".equals(infos.getMeetingId())){
											if(!"my".equals(type)){%>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;参会人:</td>
                                           <td><input name="meetingPeople" id="meetingPeople" value="<%=strName %>" type="text" size="95" style="border:1px #C0C0C0 solid;background:#F4F4F4; height:19px"/>
                                           </td>
                                           <td>
                                           	<input type="button" value="参会人通知情况" onclick="showIncept()"/>
                                           	
                                           </td>
                                         </tr>
                                         <%
                                         	}
                                         }
                                         %>
										<%
										if(fileList!=null && fileList.size()>0){
										%>
										<tr>
											<td align="right">
												<img src="images/dfdf_03.gif" />
												&nbsp;文件下载:
											</td>
											<td>
												<table width="400px" border="0" cellspacing="0">
												<tr>
													<td width="400px" cellpadding="0" cellspacing="0" class="ttaabb" style="font-weight:normal">
												<%
													for (Iterator iterator = fileList.iterator(); iterator.hasNext();) {
														MeetingRoomFileUpload file = (MeetingRoomFileUpload) iterator.next();
												%>
													<a href="<%=basePath %>tjsinfo/tjsoa/meetingroom/ioAction.do?id=<%=file.getUuid()%>"><%=file.getOldFileName()%></a>&nbsp;&nbsp;&nbsp;
												<%
												}
												%>
													</td>
												</tr>
												</table>
											</td>

										</tr>
										<%	
										}
										%>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;内容及特殊需要:</td>
                                           <td><textarea readonly="readonly" name="content" cols="69" rows="10"><%=infos.getMeetingContent() %></textarea></td>
                                           <td>&nbsp;</td>
                                         </tr>
                                         <%if(!"my".equals(type)){
                                         	if(!"2".equals(infos.getMeetingId())){%>
                                         <tr>
                                           <td align="right"><img src="images/dfdf_03.gif" />&nbsp;审批意见:</td>
                                           <td><textarea readonly="readonly" name="remarks" cols="69" rows="3"><%if(infos.getMinutes()!=null)out.print(infos.getMinutes()); %></textarea></td>
                                           <td>&nbsp;</td>
                                         </tr>
                                         <%
                                         	}
                                         } %>
                                         <tr>
                                           <th colspan="3">&nbsp;</th>
                                         </tr>
                                       </table>
                                    </td>
                                  </tr>
                                </table>
                            </td>
                          </tr>
                     </table>
              </div>
            </td>
          </tr>
      </table>
		</form>
		</div>
		<div id="inceptDiv" class="GroupDiv">
			<table width="700px" border="0" cellspacing="0">
				<tr>
					<td>
						<table class="p_08" width="760px" border="0"
							cellspacing="0">
							<tr>
								<th width="200px" style="text-align: center">
									姓名
								</th>
								<th width="100px" style="text-align: center">
									状态

								</th>
								<th width="200px" style="text-align: center">
									查看时间
								</th>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<div id="stockdiv"
							style="overflow-y: scroll; overflow-x: hidden; height: 200px">
							<table class="p_08" width="740px" border="0"
								cellspacing="0" style="border: 1px">
								<%
									for (Iterator iterator = inceptList.iterator(); iterator.hasNext();) {
										MeetingIncept incept = (MeetingIncept) iterator
										.next();
										String receivetime = "&nbsp;";
										if (incept.getDatetime() != null) {
											receivetime = sdf.format(incept.getDatetime());
										}
										String state = incept.getState().toString();
										if ("0".equals(state))
											state = "待阅";
										else
											state = "已阅";
								%>
								<tr>
									<td width="200px"><%=incept.getReceiveUserName()%></td>
									<td width="100px"><%=state%></td>
									<td width="186px"><%=receivetime%></td>
								</tr>
								<%
								}
								%>
								<tr>
									<td colspan="3"><a href="javascript:closeIncept()"><b><font color="red">关闭</font></b></a></td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</body>
</html>
